﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SteamGameApp
{
    /// <summary>
    /// Interaction logic for BudgetWindow.xaml
    /// </summary>
    public partial class BudgetWindow : Window
    {
        private ObservableCollection<BudgetItem> budgetItems = new ObservableCollection<BudgetItem>();
        private const string filename = "budgetList.xml";
        public BudgetWindow()
        {

            InitializeComponent();
            budgetItems =  DataManager<BudgetItem>.Load(filename);
            budgetList.ItemsSource = budgetItems;
        }
        

        private void btnAddGame_Click(object sender, RoutedEventArgs e)
        {

        }

        private void SaveMenuItem_Click(object sender, RoutedEventArgs e)
        {
            DataManager<Game>.Save(budgetItems, filename);
            MessageBox.Show("Save Complete");
        }
    }
}
